In [15]:
import matplotlib.pyplot as plt
from astropy.io import fits
hdu=fits.open('./Skyserver_Radial9_19_2017 7_38_23 AM.fits')

In [49]:
datas=hdu[1].data
datas


Out[49]:
FITS_rec([ (1237671939804561640, 6162, 301, 3, 133, 232, 3,  258.25845787,  64.0522971 ,  17.98510551,  15.83023739,  14.83095169,  14.39797497,  14.09079933,  0.03141735,  0.00321288,  0.00243518,  0.00240166,  0.00451081),
          (1237671939804561642, 6162, 301, 3, 133, 234, 3,  258.24026131,  64.0510324 ,  19.98868942,  18.03932762,  17.15538788,  16.76332283,  16.51384735,  0.07910972,  0.00781693,  0.00561744,  0.00560891,  0.01337698),
          (1237671939804561639, 6162, 301, 3, 133, 231, 6,  258.25137862,  64.03939626,  16.65376472,  14.90637112,  14.24243546,  13.99270439,  13.88174057,  0.00698373,  0.00303615,  0.00343139,  0.00374394,  0.00398047),
          (1237671939804627060, 6162, 301, 3, 134, 116, 6,  258.27350589,  64.03896263,  17.95848656,  16.49461555,  15.96560764,  15.79138279,  15.71845341,  0.01273685,  0.00367337,  0.00385283,  0.00420579,  0.00609423),
          (1237671939804561470, 6162, 301, 3, 133,  62, 3,  258.20836638,  64.05294822,  19.22208023,  17.00105476,  16.03318214,  15.59466076,  15.3422451 ,  0.04538298,  0.00439698,  0.00327565,  0.00319817,  0.0064638 ),
          (1237671939804561475, 6162, 301, 3, 133,  67, 3,  258.21335662,  64.07316958,  19.2498188 ,  17.20154953,  16.26257515,  15.75251865,  15.49400997,  0.04919098,  0.0049885 ,  0.00369482,  0.00347343,  0.00741661),
          (1237671939804561999, 6162, 301, 3, 133, 591, 3,  258.23095098,  64.03240904,  19.74761009,  18.29159355,  17.63881111,  17.27000046,  17.15743065,  0.07632028,  0.0093228 ,  0.00787527,  0.00812204,  0.02589245),
          (1237671939804562030, 6162, 301, 3, 133, 622, 3,  258.26622329,  64.03317966,  19.9234066 ,  18.88599014,  18.63630486,  18.40208054,  18.36489677,  0.05814821,  0.01053623,  0.011511  ,  0.0129125 ,  0.04428132),
          (1237671939804626958, 6162, 301, 3, 134,  14, 3,  258.31582624,  64.0518474 ,  18.72444534,  16.54133797,  15.58638573,  15.13233566,  14.83273315,  0.05096685,  0.0044573 ,  0.00320754,  0.00310202,  0.00664779),
          (1237671939804627072, 6162, 301, 3, 134, 128, 6,  258.28079298,  64.03192608,  18.51154709,  17.012043  ,  16.38792801,  16.16128349,  16.00929642,  0.01713498,  0.00415021,  0.00407952,  0.00446226,  0.00682641),
          (1237671939804627251, 6162, 301, 3, 134, 307, 6,  258.26016756,  64.07022258,  19.32624245,  17.41746712,  16.68910408,  16.42243004,  16.2781105 ,  0.02723402,  0.00470689,  0.00436539,  0.00465831,  0.0076953 ),
          (1237671939804561484, 6162, 301, 3, 133,  76, 3,  258.18163622,  64.05353955,  19.60752296,  17.72212982,  16.78736687,  16.35057831,  16.07873154,  0.05081972,  0.00591815,  0.0043678 ,  0.00422049,  0.0088861 ),
          (1237671939804626957, 6162, 301, 3, 134,  13, 3,  258.31943827,  64.05568826,  19.21840096,  17.24371338,  16.31704521,  15.87998199,  15.57243347,  0.04693301,  0.00511249,  0.00379376,  0.00371242,  0.00768696),
          (1237671939804626960, 6162, 301, 3, 134,  16, 3,  258.34389773,  64.04899076,  19.05873108,  17.08336067,  16.15984344,  15.72957993,  15.39665031,  0.04462828,  0.00517349,  0.00376786,  0.00367351,  0.00732124),
          (1237671939804626961, 6162, 301, 3, 134,  17, 3,  258.33324731,  64.05681207,  19.87783051,  17.77311516,  16.80273438,  16.35116577,  16.02886963,  0.06792694,  0.00627842,  0.00448662,  0.00431814,  0.00916308),
          (1237671939804627279, 6162, 301, 3, 134, 335, 3,  258.30378208,  64.02878111,  19.64468956,  17.67819214,  16.78150749,  16.3625679 ,  16.03446388,  0.05324002,  0.00577244,  0.00432031,  0.00423725,  0.00882971),
          (1237671939804627308, 6162, 301, 3, 134, 364, 3,  258.31341861,  64.07329146,  18.38933372,  16.30844498,  15.37369728,  14.94565201,  14.6135397 ,  0.03299727,  0.00361956,  0.00279871,  0.00273528,  0.00513557),
          (1237671939804561472, 6162, 301, 3, 133,  64, 3,  258.17098693,  64.07269654,  19.24468613,  17.08180428,  16.12346458,  15.65042782,  15.33794022,  0.04802281,  0.00466689,  0.00347794,  0.00330041,  0.00654745),
          (1237671939804561565, 6162, 301, 3, 133, 157, 6,  258.16978663,  64.01743021,  16.38538933,  14.86227226,  12.96152496,  12.62121582,  13.13215446,  0.00762788,  0.00456401,  0.00210705,  0.00184574,  0.00604212),
          (1237671939804627262, 6162, 301, 3, 134, 318, 3,  258.27281293,  64.09122343,  19.88471031,  17.66265488,  16.7001915 ,  16.24949455,  15.89843082,  0.07111309,  0.00597265,  0.00429377,  0.00415226,  0.00863977),
          (1237671939804627306, 6162, 301, 3, 134, 362, 3,  258.34051663,  64.06907073,  18.71744728,  16.65772629,  15.7113142 ,  15.28200531,  14.95813084,  0.03182565,  0.0038058 ,  0.00295844,  0.00290383,  0.00525049),
          (1237671939804627307, 6162, 301, 3, 134, 363, 3,  258.32933258,  64.07684682,  18.16275215,  16.11195374,  15.15861416,  14.73167992,  14.43070221,  0.02943194,  0.00333849,  0.00259548,  0.00255108,  0.00477566)],
         dtype=(numpy.record, [('objid', '>i8'), ('run', '>i2'), ('rerun', '>i2'), ('camcol', 'u1'), ('field', '>i2'), ('obj', '>i2'), ('type', '>i2'), ('ra', '>f8'), ('dec', '>f8'), ('u', '>f4'), ('g', '>f4'), ('r', '>f4'), ('i', '>f4'), ('z', '>f4'), ('Err_u', '>f4'), ('Err_g', '>f4'), ('Err_r', '>f4'), ('Err_i', '>f4'), ('Err_z', '>f4')]))

In [50]:
u=datas.field(9)
g=datas.field(10)
r=datas.field(11)

In [51]:
u_g=u-g
g_r=g-r

In [55]:
fig, ax = plt.subplots()
plt.figure(1)
fig.set_size_inches(20, 15)
legend = ax.legend(loc='upper right', shadow=True, fontsize='x-large')
#legend.get_frame().set_facecolor('#00FFCC')
plt.xlabel('u-g[mag]',fontsize=20)
plt.ylabel('g-r[mag]',fontsize=20)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
plt.plot(u_g,g_r,'bo',10)
plt.axis([1,2.5,0,2])
plt.show()


/home/cfzhang/.local/lib/python3.5/site-packages/matplotlib/axes/_axes.py:545: UserWarning: No labelled objects found. Use label='...' kwarg on individual plots.
  warnings.warn("No labelled objects found. "

Description:

The pattern seems to be that "g-r" magnitude and "u-g" magnitude are positively related.


In [ ]: